package com.farm.pic;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;


/**
 * ClassName: PicController
 * Package: com.farm.pic
 * Description
 *传的path不能带双引号
 * @Author KarUo
 * @Create 2024/3/9 21:12
 * @Version 1.0
 */
@RequestMapping("/pic")
@Slf4j
@RestController
public class PicController {

    @PostMapping("/pic/build")
    public void picBuild(String path) throws InterruptedException, IOException {
       Pic pic = new Pic();
        boolean result = pic.getAccessToken();
        if (result){
/*            Scanner sc = new Scanner(System.in);
            path=sc.nextLine();*/
            pic.getAnswer(path);
            }
        }
    }

